<?php
if($p_data){
    if($p_data['new']) foreach($p_data['new'] as $d){
        if(empty($d['id'])) continue;
        $session->user()->createUser($d['id'],$d['name'],$d['group'],$d['password']);
    }

    if($p_data['old']) foreach($p_data['old'] as $k => $d){
        if($k == "nq" || empty($k)) continue;
        if($d['delete'] == "TRUE"){
            $session->user()->deleteUser($k);
            continue;
        }
        $session->user()->setUserInfo($d['id'],$d['name'],$d['group'],$d['password']);
    }
}

$smarty->assign("UserList",$session->user()->getUserList());
$smarty->assign("GroupList",$session->user()->getGroupList());
return $smarty->fetch('config.tpl');
?>
